package indoor.nexd.com.nexdmap.model;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;

public class RecordBean {
    private String record;
    private Set<String> position;
    private long poi;

    public String getRecord() {
        return record;
    }

    public void setRecord(String record) {
        this.record = record;
    }

    public List<double[]> getPoint() {
        List<double[]> points = new ArrayList<>();
        for (String value : position) {
            double center_x = Double.parseDouble(value.substring(0, value.indexOf(",")));
            double center_y = Double.parseDouble(value.substring(value.indexOf(",") + 1, value.lastIndexOf(",")));
            setPoi(Long.parseLong(value.substring(value.lastIndexOf(",") + 1)));
            points.add(new double[]{center_x, center_y});
        }
        return points;
    }

    public void setPosition(Set<String> position) {
        this.position = position;
    }

    public long getPoi() {
        return poi;
    }

    public void setPoi(long poi) {
        this.poi = poi;
    }
}